<template>
  <div id="app">
      <router-view></router-view>
  </div>
</template>

<script>

export default {
  mounted () {
    this.getToken();
  },
  methods: {
    getToken() {
      let token = localStorage.miniToken
      if (token) {
        this.$store.dispatch("emitToken", token)
      } else {
        this.$router.push("/login")
      }
    }
  },
}
</script>

<style lang="scss">
html,
body,
#app {
  width: 100%;
  font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
* {
  margin: 0;
  padding: 0;
}

</style>
